- sslStatus = hook.enable_ssl_verification ? _('enabled') : _('disabled')
- sslBadgeText = _('SSL Verification:') + ' ' + sslStatus

%li.gl-border-b
  .gl-flex.gl-flex-wrap.gl-justify-between.gl-gap-x-5.gl-gap-y-3{ class: "@sm/panel:gl-flex-nowrap" }
    .gl-basis-full.gl-flex.gl-flex-col
      - if hook.name?
        %p.gl-font-semibold.gl-mb-0
          = hook.name
      %p.gl-mb-2{ class: hook.name ? 'gl-text-subtle' : 'gl-font-semibold' }
        = hook.url

        - if hook.rate_limited?
          = gl_badge_tag(_('Webhooks|Rate limited'), variant: :danger)
        - elsif hook.permanently_disabled?
          = gl_badge_tag(s_('Webhooks|Disabled'), variant: :danger)
        - elsif hook.temporarily_disabled?
          = gl_badge_tag(s_('Webhooks|Temporarily disabled'), variant: :warning)

      %div
        - hook.class.triggers.each_value do |trigger|
          - if hook.public_send(trigger)
            = gl_badge_tag(integration_webhook_event_human_name(trigger), variant: :neutral)
        = gl_badge_tag(sslBadgeText, variant: :neutral)

    .gl-text-sm
      = truncate(hook.description, length: 200)

    .gl-flex.gl-items-baseline.gl-gap-3
      = render 'shared/web_hooks/test_button', hook: hook, size: 'small'
      = render Pajamas::ButtonComponent.new(href: edit_hook_path(hook), size: :small) do
        = _('Edit')
      = render Pajamas::ButtonComponent.new(href: destroy_hook_path(hook), category: :secondary, variant: :danger, size: :small, method: :delete, button_options: { 'aria-label' => s_('Webhooks|Delete webhook'), data: { confirm_btn_variant: "danger", confirm: s_('Webhooks|Are you sure you want to delete this webhook?') } }) do
        = _('Delete')
